import { createRequest } from '/@/api/service';
const module = 'ib/archive/police/v1/DossierRecord/';

/**
 * @function 文件归还
 * @param data
 * @param header
 * @returns
 */
function RETURN_DOSSIER(
  data: DossierRecord.DossierRecordBaseReq,
  header: object = {},
): Promise<DossierRecord.DossierRecordBaseResp> {
  return createRequest(`${process.env.APP_API_URL}${module}returnDossier`, data, header, 'POST');
}

/**
 * @function 申请借阅
 * @param data
 * @param header
 * @returns
 */
function INSERT_DOSSIER_RECORD(
  data: DossierRecord.DossierRecordOperateReq,
  header: object = {},
): Promise<DossierRecord.DossierRecordOperateResp> {
  return createRequest(
    `${process.env.APP_API_URL}${module}insertDossierRecord`,
    data,
    header,
    'POST',
  );
}

export { RETURN_DOSSIER, INSERT_DOSSIER_RECORD };
